﻿// See https://aka.ms/new-console-template for more information
using System.Net;
using WOLServer;

try
{
    WOLServer.WOLService wolService = new WOLServer.WOLService();
    if (args.Length != 4)
    {
        Console.WriteLine("WOLServer serviceIp,subnet port interval");
        Console.WriteLine("eg:");
        Console.WriteLine("WOLServer 192.168.1.210 255.255.255.255 12134 5");
        //Console.WriteLine("WOLServer 192.168.1.255 12134 5");
        return;
    }
    wolService.Start(args[0], args[1], int.Parse(args[2]), int.Parse(args[3]));
}
catch (Exception ex)

{
    WOLService.Log(ex.ToString());
}